%h1.user Modify Account
%table.user
  - form_for @user, users_url, :method => :put do |form|
    %tr
      %td.field_title User name:
      %td.field= form.text_field     :login
      %td.error= error_message_on    :user, :login
    %tr
      %td.field_title E-mail:
      %td.field= form.text_field     :email
      %td.error= error_message_on    :user, :email
    %tr
      %td.field_title Password:
      %td.field= form.password_field :password
      %td.error= error_message_on    :user, :password
    %tr
      %td.field_title Confirm Password:
      %td.field= form.password_field :password_confirmation
      %tr.error= error_message_on    :user, :password_confirmation
    %tr
      %td.submit= submit_tag 'Update'
  - if current_user.is_admin?
    - form_for @user, users_url, :html => {:method => :delete} do |form|      
      %tr
        %td.submit= submit_tag 'Delete'